<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class article extends Model {
	public function user() {
		return $this->belongsTo('App\User', 'user_id');
	}
	public function topic() {
		return $this->belongsTo('App\Topic', 'topic_id');
	}
	public function column() {
		return $this->belongsTo('App\Column', 'column_id');
	}
	public function topicArticle() {
		return $this->hasMany('App\topicArticle', 'article_id');
	}
	public function discusses() {
		return $this->hasMany('App\discuss');
	}
}
